const Batch = imports.gdm.batch;
const Fprint = imports.gdm.fingerprint;
const Main = imports.ui.main;
+const Params = imports.misc.params;
const Tweener = imports.ui.tweener;
const PASSWORD_SERVICE_NAME = 'gdm-password';
const ShellUserVerifier = new Lang.Class({
Name: 'ShellUserVerifier',
- _init: function(client) {
+ _init: function(client, params) {
+ params = Params.parse(params, { reauthenticationOnly: false });
+ this._reauthOnly = params.reauthenticationOnly;
+
this._client = client;
this._settings = new Gio.Settings({ schema: LOGIN_SCREEN_SCHEMA });
this._hold.release();
} catch (e) {
+ if (this._reauthOnly) {
+ logError(e, 'Failed to open reauthentication channel');
+
+ this._hold.release();
+ this.emit('verification-failed');
+
+ return;
+ }
+
// If there's no session running, or it otherwise fails, then fall back
// to performing verification from this login session
client.get_user_verifier(this._cancellable, Lang.bind(this, this._userVerifierGot));
this._user = this._userManager.get_user(this._userName);
this._greeterClient = new Gdm.Client();
- this._userVerifier = new GdmUtil.ShellUserVerifier(this._greeterClient);
+ this._userVerifier = new GdmUtil.ShellUserVerifier(this._greeterClient, { reauthenticationOnly: true });
this._userVerifier.connect('reset', Lang.bind(this, this._reset));
this._userVerifier.connect('ask-question', Lang.bind(this, this._onAskQuestion));